import React from "react"
require('./IconBlock.less')
class IconBlock extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
        }
    }
    makeIcon() {
        const { 
            type,
            title,
        } = this.props
        if(type === "NO-DATA"){
            return (
                <div className="have-no-data">
                    <i className="iconfont icon-iconfontjinggao">
                    </i>
                    <div className="text">
                        暂无数据
                    </div>
                </div>
            )
        }  else {
            return (
                <div className="have-no－delivery-data">
                    <i className="iconfont icon-iconfontjinggao">
                    </i>
                    <div className="text">
                        {title}
                    </div>
                </div>
            )
        }
    }
    render() {
        let content = this.makeIcon()
        return (
            <div className="IconBlock">
                {content}
            </div>
        )
    }
}
module.exports = IconBlock